package com.asion.gankapp.view.activities;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.asion.gankapp.R;
import com.asion.gankapp.utils.particleview.ParticleView;

public class WelcomeActivity extends AppCompatActivity {
    //点开gankapp的动画，执行完后跳转到MainActivity，相当于开机动画
    private ParticleView mPvGithub;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);


        mPvGithub = (ParticleView) findViewById(R.id.pv_github);

        mPvGithub.startAnim();

        mPvGithub.setOnParticleAnimListener(()->{
            Intent intent = new Intent(WelcomeActivity.this, MainActivity.class);
            WelcomeActivity.this.startActivity(intent);
            finish();
        });

    }
}
